<template>
  <div class="recommond-songs">
    <h2>推荐歌单</h2>
    <div class="recommond-songs-item">
      <div class="item" v-for="(item,index) in recommondSongs" :key="index">
        <img :src="item.picUrl" />
        <span>{{item.trackCount}}万</span>
        <p>{{item.name}}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    recommondSongs: {
      type: Array,
      default() {
        return [];
      },
    },
  },
};
</script>

<style scoped>
.recommond-songs {
  margin-top: 40px;
  padding-top: 20px;
  padding-bottom: 24px;
}
.recommond-songs h2 {
  position: relative;
  padding-left: 9px;
  margin-bottom: 14px;
  font-size: 17px;
  height: 20px;
  line-height: 20px;
  font-weight: 400;
  color: #333;
}
.recommond-songs h2::after {
  position: absolute;
  content: "";
  background-color: #d33a31;
  width: 2px;
  height: 16px;
  left: 0;
  top: 50%;
  margin-top: -9px;
}
.recommond-songs-item {
  display: flex;
  flex-wrap: wrap;
}
.item {
  width: 33.3%;
  position: relative;
  padding-right: 2px;
  margin-bottom: 16px;
}
.item img {
  width: 100%;
}
.item span {
  position: absolute;
  right: 5px;
  top: 2px;
  z-index: 3;
  color: #fff;
  font-size: 12px;
}
.item span::after {
  position: absolute;
  top: 0;
  left: -12px;
  width: 11px;
  height: 10px;
  content: "";
  background-repeat: no-repeat;
  background-size: 11px 10px;
  text-shadow: 1px 0 0 rgba(0, 0, 0, 0.15);
  background-image: url();
}
.item p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  min-height: 30px;
  line-height: 1.2;
  padding: 6px 2px 0 6px;
  overflow: hidden;
}
</style>